import QtQuick 1.1
import com.nokia.symbian 1.1
import "core.js" as Core

PageStackWindow {
    id: window
    initialPage: MainPage {tools: toolBarLayout}
    showStatusBar: true
    showToolBar: true

    ToolBarLayout {
        id: toolBarLayout
        ToolButton {
            flat: true
            iconSource: "toolbar-back"
            onClicked: window.pageStack.depth <= 1 ? Qt.quit() : window.pageStack.pop()
        }
        ToolButton {
            iconSource: "toolbar-add"
            // Let’s add some text for debugging purposes
            onClicked: print("add todo item to inbox");
        }
        ToolButton {
            flat: true
            iconSource: "toolbar-menu"
            onClicked: window.pageStack.push((Qt.resolvedUrl("DetailsView.qml")))

        }

    }
    Component.onCompleted:
    {
        Core.openDB();
      //  Core.dropTable();
        pageStack.push(Qt.resolvedUrl("MainPage.qml"));
    }
}
